<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');

class Mod_leaving extends PNC_Model {

	public function get_leaving_type() {
		$query = $this->db->get('pnc_leave_type');
		$leaving[0] = '--- Select One ---';
		foreach ($query->result_array() as $row) {
			$leaving[$row['lea_id']] = $row['lea_name'];
		}
		return $leaving;
	}

	public function get_sub_leaving() {
		$query = $this->db->get('pnc_sub_leave');
		$sub[0] = '--- Select One ---';
		foreach ($query->result_array() as $row) {
			$sub[$row['stl_id']] = $row['stl_name'];
		}
		return $sub;
	}

	public function get_department() {
		$query = $this->db->get('pnc_department');
		$dept[0] = '--- Select One ---';
		foreach ($query->result_array() as $row) {
			$dept[$row['dept_id']] = $row['dept_name'];
		}
		return $dept;
	}

}